﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RpgLibrary;
using RpgLibrary.CharacterClasses;
using RpgLibrary.ItemClasses;
namespace RpgEditor
{
    public partial class FormMain : Form
    {
        #region Field Region
        RolePlayingGame rolePlayingGame;
FormClasses frmClasses;
        #endregion
        #region Property Region
        #endregion       
        #region Constructor Region
        public FormMain()
        {
            InitializeComponent();
            newGameToolStripMenuItem.Click += new EventHandler(newGameToolStripMenuItem_Click);
            openGameToolStripMenuItem.Click += new EventHandler(openGameToolStripMenuItem_Click);
            saveGameToolStripMenuItem.Click += new EventHandler(saveGameToolStripMenuItem_Click);
            exitGameToolStripMenuItem.Click += new EventHandler(exitToolStripMenuItem_Click);
            classesToolStripMenuItem.Click += new EventHandler(classesToolStripMenuItem_Click);
        }
        #endregion
        #region Menu Item Event Handler Region
        void newGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (FormNewGame frmNewGame = new FormNewGame())
            {
                DialogResult result = frmNewGame.ShowDialog();
                if (result == DialogResult.OK && frmNewGame.RolePlayingGame != null)
                {
                    classesToolStripMenuItem.Enabled = true;
                    rolePlayingGame = frmNewGame.RolePlayingGame;
                }
            }
        }
        void openGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }
        void saveGameToolStripMenuItem_Click(object sender, EventArgs e)
        {
        }
        void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        void classesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (frmClasses == null)
            {
                frmClasses = new FormClasses();
                frmClasses.MdiParent = this;
            }
            frmClasses.Show();
        }
        #endregion
        #region Method Region
        #endregion
    }
}